This document facilitates the visualization of paired-chain T cell receptor (TCR) datasets prepared using TCRPaired. TCRView provides a complementary set of tools to explore the distribution of, and relationships between, TCR:pMHC complex components in a benchmark dataset. These components include epitopes, major histocompatibility complexes (MHCs), and TCR features such as VJ genes and sequence segments.
# tcr.view.file <- "./paired-data/all-distinct-cdr-paired-sequences.csv"
# tcr.view.file <- "./paired-data/high-confidence-paired-sequences.csv"
tcr.view.file <- "./view-data/high-confidence-data/TCRView-data.csv"
tcr.view.set <- read.csv(tcr.view.file)
# To make plots more legible, string wrap Epitope species values to 12 characters
tcr.view.set$Epitope.species <- str_wrap(tcr.view.set$Epitope.species, 12)
TCRView is intended to run on entire datasets as well as data subsets for both 1) investigation of data composition and bias in TCR:pMHC complex datasets and 2) exploration of relationships between TCR:pMHC complex components. As such, a number of parameters can be set to filter and facet the data, as well as to save clustering data for further analysis.
The following parameters can be set to customize the data visualization:
plotly: Set to TRUE to generate
interactive plotly plots, or FALSE to generate basic
ggplot2 plots.
filter.by: A filtering expression to subset the
data. For example,
filter.by = "Epitope.species == 'Influenza A'" will filter
the data to include only receptors with epitopes from Influenza A in all
plots. This can be useful for exploring relationships between TCR:pMHC
complex components for specific epitopes, epitope species, MHC loci, or
V/J gene profiles.
group.by: The name of a column to group the data by.
For example, group.by = "Epitope.species" will create
separate distribution lines for each epitope species in count
distribution plots and limit composition plots to those epitopes. This
can be useful for comparing the distribution of TCR:pMHC complex
components across different subgroups.
top: The number of top group.by values to display in
count distribution and composition plots. For example,
top = 10 will display the top 10 epitopes in the dataset.
Additionally, this has use in the clustering section, which is specified
later.
option: The name of the viridis palette to use for
coloring the plots. For example, option = "turbo" will
color the plots using the turbo palette. This can be useful for
distinguishing between different group.by values in the plots.
begin: The beginning of the viridis palette to use
for coloring the plots. For example, begin = 0.2 will color
the plots using the turbo palette starting at the 20th percentile. This
can be useful for distinguishing between different group.by values in
the plots.
end: The end of the viridis palette to use for
coloring the plots. For example, end = 0.8 will color the
plots using the turbo palette ending at the 80th percentile. This can be
useful for distinguishing between different group.by values in the
plots.
out.path: The path to save the clustering data. This
allows you to save plots and data for further analysis, especially when
running multiple subsets of the same data.
Due to the reuse of some of these parameters in differing plot types
across components, there are multiple setup sections
throughout TCRView to allow ease of analysis while specifying intended
plot orientations. These also introduce new parameters as needed.
# Do you want the plots to be a basic ggplot or interactive plotly plot?
plotly = TRUE
# Do you want to filter the data using a filtering expression (e.g., str_detect(Epitope.species, "SARS-CoV-2"))?
filter.by = NULL
# Do you want to group the data by a factor (e.g., "Epitope.species")?
group.by = "Epitope.species"
# Do you want to limit the grouped data to the top n values?
top = 5
# How do you want to color the plots (viridis palettes)?
option = "turbo"
begin = 0
end = 1
# Where do you want to save any plot and clustering data?
out.path = "./view-data/high-confidence-data/"
dir.create(out.path, showWarnings = FALSE, recursive = TRUE)
Epitopes are the antigenic peptides that are presented by MHC molecules and recognized by TCRs. The distribution of epitopes in a dataset can provide insight into the diversity of the dataset and the potential biases in the data. The following tables and plots provide an overview of the epitopes in the dataset.
# Epitope count distribution
plotEpitopeCountDistribution(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option)
# Epitope count distribution per epitope species (top species, all other as "Other")
plotEpitopeCountDistribution(tcr.view.set, group.by = group.by, top = top, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# All epitopes
plotEpitopeComposition(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# Epitopes for top epitope species
plotEpitopeComposition(tcr.view.set, group.by = group.by, top = top, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# All epitope species
plotEpitopeSpeciesComposition(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
MHC molecules are responsible for presenting epitopes to TCRs. Although not directly present involved in the TCR:epitope binding interface, MHC identity plays an important role in epitope processing and assist in determining protein complex binding conformations. The following tables and plots provide an overview of the MHCs in the dataset.
# Do you want the plots to be a basic ggplot or interactive plotly plot?
plotly = TRUE
# Do you want to filter the data using a filtering expression (e.g., str_detect(Epitope.species, "SARS-CoV-2"))?
filter.by = NULL
# Do you want to group the data by a factor (e.g., "Epitope.species")?
group.by = "MHC.locus"
# Do you want to limit the grouped data to the top n values?
top = 5
# How do you want to color the plots (viridis palettes)?
option = "plasma"
begin = 0.9
end = 0.1
# MHC distribution
# MHC locus
plotMHCLocusCountDistribution(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option)
# MHC allele
plotMHCAlleleCountDistribution(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option)
# MHC
plotMHCCountDistribution(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option)
# MHC allele distribution, by loci
plotMHCAlleleCountDistribution(tcr.view.set, group.by = group.by, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Warning: Groups with fewer than two data points have been dropped.
# MHC composition
# MHC locus
plotMHCLocusComposition(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# MHC allele
plotMHCAlleleComposition(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# MHC, by loci
plotMHCComposition(tcr.view.set, plotly = plotly, filter.by = filter.by, group.by = group.by, option = option, begin = begin, end = end)
VJ genes are the variable and joining gene segments that make up the TCR. These genes contribute directly to TCR sequence through the process of variable (diversity) joining recombination, and as such play an important role in understanding and predicting TCR specificity. The following tables and plots provide an overview of the VJ genes in the dataset.
# Do you want the plots to be a basic ggplot or interactive plotly plot?
plotly = TRUE
# Do you want to filter the data using a filtering expression (e.g., str_detect(Epitope.species, "SARS-CoV-2"))?
filter.by = NULL
# Do you want to facet the data by a factor (e.g., "Epitope.species")?
group.by = "`Gene Family`"
# Do you want to limit the filtered and/or faceted data to the top n values?
top = 10
# How do you want to color the plots (viridis palettes)?
option = "viridis"
begin = 0
end = 1
# VJ composition
# V J alleles
plotVJAllele(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# VJ genes
plotVJGene(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# VJ gene families
plotVJFamily(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# V J gene profile sankey diagrams
TCR sequences are highly variable, with the complementarity determining regions (CDRs) being the most variable regions. This high degree of variability directly informs the vast diversity of TCR specificity and binding mechanisms. As such, multiple facets of the TCR sequence are explored in the following sections.
The following parameters are changed or added for the analysis of TCR sequences, particularly clustering of complementarity determining regions (CDRs) and full sequences:
top.col: If provided, the name of a column to limit
the coloring of the data to. For example,
top.col = "Epitope.species" will limit the coloring of the
data to the epitope species in clustering plots. All other values will
be colored as “Other”. Cannot be used concurrently with
‘threshold.col’.
top: The number of top facet.by values to display in
count distribution and composition plots. For example,
top = 10 will display the top 10 epitopes in the dataset.
Additionally, this is the number of top values to display in clustering
plots, e.g., the top 10 epitope species in the
dataset.
threshold.col: If provided, the name of a column to
limit the coloring of the data to some feature with > n receptors.
For example, threshold.col = "Epitope" and
threshold = 50 will limit the coloring of the data to
receptors with epitopes that have > 50 receptors in clustering plots.
All other values will be colored as “Other”. Cannot be used concurrently
with ‘top.col’.
threshold: The number of receptors to limit the
coloring to. For example, threshold = 50 will limit the
coloring of the data to receptors with epitopes that have > 50
receptors in clustering plots. All other values will be colored as
“Other”.
highlight: A vector of values to highlight in
clustering plots without discarding non-matching data,
as is accomplished using filter.by. For example,
highlight = c("Epitope == 'GILGFVFTL'") will highlight
receptors with the epitope “GILGFVFTL” in clustering plots, coloring all
other receptors as “Other”. It can also be used to highlight specific
TCRs using the clone.id parameter for use in benchmark case
studies.
color: If used in conjunction with highlight, the
name of a column to label the highlighted values by. For example,
color = "Epitope" will label the highlighted values by
epitope in clustering plots. If not used in conjunction with highlight,
this parameter will be used to color the data in clustering plots. The
default value of color is “Epitope”.
save: Set to TRUE to save clustering
data in the initial TCRView dataset, or FALSE to not save
clustering data. If not run prior to the clustering functions, plots
will include the clustering step, but UMAP coordinates cannot be
guaranteed to be the same across plots.
As before, these parameters may be changed on a per-plot basis. This is shown in the cluster plots below, which aim to highlight the utility of clustering functions.
# Do you want the plots to be a basic ggplot or interactive plotly plot?
plotly = TRUE
# Do you want to filter the data using a filtering expression (e.g., str_detect(Epitope.species, "SARS-CoV-2"))?
filter.by = NULL
# Do you want to limit the coloring of the data to a specific factor (e.g., "Epitope.species")?
top.col = NULL
# How many top values do you want to display?
top = 10
# Do you want to limit the coloring of the data to some feature with > n receptors?
threshold.col = NULL
# How many receptors do you want to limit the coloring to?
threshold = NULL
# Do you want to highlight the position of specific values (e.g., clone.id %in% ..., Epitope == "GILGFVFTL") without hiding the rest of the data?
highlight = NULL
# What column do you want to label these values by?
color = NULL
# How do you want to color the plots (viridis palettes)?
option = "turbo"
begin = 0
end = 1
# Do you want to save clustering data?
save = FALSE
CDR3 is the most variable region of the TCR, and is formed by random recombination rather than V(D)J recombination. Structurally, CDR3 sits directly at the binding interface of the TCR:pMHC complex, and as such is a key determinant of TCR specificity. Many binding prediction methods focus exclusively on the CDR3 region, and as such, it is important to understand the distribution of CDR3 lengths and sequences in a dataset.
# CDR3 alpha and beta lengths
# By top 10 epitopes
plotCDR3SeqLength(tcr.view.set, color.by = "Epitope", top = top, plotly = plotly, filter.by = filter.by, option = "turbo")
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# By epitope species
plotCDR3SeqLength(tcr.view.set, color.by = "Epitope.species", plotly = plotly, filter.by = filter.by, option = "turbo")
# By MHC locus
plotCDR3SeqLength(tcr.view.set, color.by = "MHC.locus", plotly = plotly, filter.by = filter.by, option = "plasma", begin = 0.9, end = 0.1)
set.seed(77482951)
# CDR3
# Combined chains
# Run clustering
# tcr.view.set <- getCDR3SeqCluster(tcr.view.set, combine.chains = TRUE, filter.by = filter.by)
# All, colored by cluster (default)
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = TRUE, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
## ℹ Please use tidy evaluation idioms with `aes()`.
## ℹ See also `vignette("ggplot2-in-packages")` for more information.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
# Top 10 epitope species
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = TRUE, top = top, top.col = "Epitope.species", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors from epitopes with > 50 receptors
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = TRUE, threshold = 50, threshold.col = "Epitope", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors limited to SARS-CoV-2 epitopes, colored by epitope: this will not save clusters to the original data file; if you wanted to do that, you'd have to re-run the clustering with the filter.by argument
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = TRUE, plotly = plotly, filter.by = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
## ℹ Please use `all_of()` or `any_of()` instead.
## # Was:
## data %>% select(umap1.name)
##
## # Now:
## data %>% select(all_of(umap1.name))
##
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
## Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
## ℹ Please use `all_of()` or `any_of()` instead.
## # Was:
## data %>% select(umap2.name)
##
## # Now:
## data %>% select(all_of(umap2.name))
##
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
## Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
## ℹ Please use `all_of()` or `any_of()` instead.
## # Was:
## data %>% select(cluster.name)
##
## # Now:
## data %>% select(all_of(cluster.name))
##
## See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
# SARS-CoV-2 epitope, overlaid on all receptors
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = TRUE, plotly = plotly, highlight = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Per chain
# Run clustering
# tcr.view.set <- getCDR3SeqCluster(tcr.view.set, combine.chains = FALSE, filter.by = filter.by)
# All, colored by cluster (default)
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = FALSE, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# Top 10 epitope species
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = FALSE, top = top, top.col = "Epitope.species", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors from epitopes with > 50 receptors
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = FALSE, threshold = 50, threshold.col = "Epitope", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors limited to SARS-CoV-2 epitopes
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = FALSE, plotly = plotly, filter.by = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
# SARS-CoV-2 epitope, overlaid on all receptors
plotCDR3SeqClusterResults(tcr.view.set, combine.chains = FALSE, plotly = plotly, highlight = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
Although not as immensely diverse as the CDR3 region, the remaining CDRs (CDR1, CDR2, and CDR2.5) are still highly diverse and contribute to TCR binding conformations. While commonly assumed that only the CDR3 makes direct contact with epitopes during binding, multiple studies have shown other CDRs to be involved in binding.
set.seed(77482951)
# CDR clustering
# Combined chains
# Run clustering
# tcr.view.set <- getCDRSeqCluster(tcr.view.set, combine.chains = TRUE, filter.by = filter.by)
# All, colored by cluster (default)
plotCDRSeqClusterResults(tcr.view.set, combine.chains = TRUE, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# Top 10 epitope species
plotCDRSeqClusterResults(tcr.view.set, combine.chains = TRUE, top = top, top.col = "Epitope.species", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors from epitopes with > 50 receptors
plotCDRSeqClusterResults(tcr.view.set, combine.chains = TRUE, threshold = 50, threshold.col = "Epitope", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors limited to SARS-CoV-2 epitopes, colored by epitope
plotCDRSeqClusterResults(tcr.view.set, combine.chains = TRUE, plotly = plotly, filter.by = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
# SARS-CoV-2 epitope, overlaid on all receptors
plotCDRSeqClusterResults(tcr.view.set, combine.chains = TRUE, plotly = plotly, highlight = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Per chain
# Run clustering
# tcr.view.set <- getCDRSeqCluster(tcr.view.set, combine.chains = FALSE, filter.by = filter.by)
# All, colored by cluster (default)
plotCDRSeqClusterResults(tcr.view.set, combine.chains = FALSE, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# Top 10 epitope species
plotCDRSeqClusterResults(tcr.view.set, combine.chains = FALSE, top = top, top.col = "Epitope.species", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors from epitopes with > 50 receptors
plotCDRSeqClusterResults(tcr.view.set, combine.chains = FALSE, threshold = 50, threshold.col = "Epitope", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors limited to SARS-CoV-2 epitopes
plotCDRSeqClusterResults(tcr.view.set, combine.chains = FALSE, plotly = plotly, filter.by = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
# SARS-CoV-2 epitope, overlaid on all receptors
plotCDRSeqClusterResults(tcr.view.set, combine.chains = FALSE, plotly = plotly, highlight = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
The full TCR sequence includes the V and J gene segments, the CDRs, and the constant region. The full sequence is important for understanding the complete TCR structure and function, and can provide insight into the diversity of the dataset.
# Full sequence clustering
# Run clustering
# tcr.view.set <- getFullSeqCluster(tcr.view.set, combine.chains = TRUE, filter.by = filter.by)
# All, colored by cluster (default)
plotFullSeqClusterResults(tcr.view.set, plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
# Top 10 epitope species
plotFullSeqClusterResults(tcr.view.set, top = top, top.col = "Epitope.species", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors from epitopes with > 50 receptors
plotFullSeqClusterResults(tcr.view.set, threshold = 50, threshold.col = "Epitope", plotly = plotly, filter.by = filter.by, option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
# Receptors limited to SARS-CoV-2 epitopes
plotFullSeqClusterResults(tcr.view.set, plotly = plotly, filter.by = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
## Found more than one class "dist" in cache; using the first, from namespace 'spam'
## Also defined by 'BiocGenerics'
# SARS-CoV-2 epitope, overlaid on all receptors
plotFullSeqClusterResults(tcr.view.set, plotly = plotly, highlight = "Epitope.species == 'Influenza A'", color = "Epitope", option = option, begin = begin, end = end)
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
if (save) {
write.csv(tcr.view.set, file = paste0(out.path, "TCRView-data.csv"), row.names = FALSE)
}